package com.vito.oa.act.extend.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.vito.act.model.ActExBussDefModel;
import com.vito.base.model.MyHashMap;
import com.vito.oa.act.extend.model.OaActExBussDefModel;

public interface OaActExBussDefMapper{

	public int saveActExBussDef(ActExBussDefModel actExBussDefModel);
	public int updateActExBussDefRef(ActExBussDefModel actExBussDefModel);
	public int deleteActExBussDef(ActExBussDefModel actExBussDefModel);
	public int queryActExBussDefCount(ActExBussDefModel actExBussDefModel);
	public int saveActExBussDefRefCol(Map<String, String> map);
	public int deleteActExBussDefRefCol(String refKey);
	public int saveActExBussDefRef(Map<String, String> map);
	public int deleteActExBussDefRef(String refKey);
	public List<MyHashMap<String, Object>> queryNodeTables(ActExBussDefModel actExBussDefModel);
	public List<MyHashMap<String, String>> queryNodeCols(String detailKey);
	/**
	 * @param actExBussDefModel
	 * @return 查询第当前节点下所有的已处理的节点 
	 */
	public List<ActExBussDefModel> queryViewActExBussDef(ActExBussDefModel actExBussDefModel);
	
	/**
	 * @param actExBussDefModel
	 * @return 查询第一个节点作为默认的开始的流程
	 */
	public ActExBussDefModel queryFirstActExBussDef(ActExBussDefModel actExBussDefModel);
	//查询节点对应的表及detailKey
	public List<MyHashMap<String, String>> queryProcessNodeTables(@Param("processKey")String processKey,@Param("processNodeId")String processNodeId);
	//查询detailKey对应的列及主外键关系
	public List<MyHashMap<String, String>> queryDeatilsCols(@Param("deatilKey")String deatilKey,@Param("tableKey")String tableKey);
	/**
	 * @param actExBussDefModel
	 * @return 查询第当前节点的下所有的节点
	 */
	public List<ActExBussDefModel> queryNextActExBussDef(ActExBussDefModel actExBussDefModel);
	
	public List<MyHashMap<String, String>> queryBussNeedCols(@Param("processKey")String processKey,@Param("processNodeId")String processNodeId);

	
	List<OaActExBussDefModel> queryActExBussDefByPage(ActExBussDefModel ActExBussDefModel);
	int saveActEExBussDef(OaActExBussDefModel actExBussDefModel);
	int deleteActEExBussDef(OaActExBussDefModel actExBussDefModel);
	int updateActEExBussDef(OaActExBussDefModel actExBussDefModel);
	OaActExBussDefModel queryActEExBussDef(@Param("processKey")String processKey,@Param("nodeId")String nodeId);
	
}



